package com.company;

import com.company.adapter.cls.AdapteeByClass;
import com.company.adapter.cls.AdapterByClass;
import com.company.adapter.cls.TargetByClass;

/**
 * 类适配器模式测试代码
 */
public class TestForClass {

    public static void main(String[] args) {

        //原来的方法，即需要被适配的方法
        AdapteeByClass adaptee = new AdapteeByClass();
        adaptee.methodA();

        System.out.println("=========================");

        //适配后的方法
        TargetByClass target = new AdapterByClass();
        target.methodA();
        target.methodB();
        target.methodC();
    }
}
